package com.youlu.campus.admin.zm.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author : [dengbo]
 * @className : SimpleSubOrderInfo
 * @description : [简单的子订单信息]
 * @createTime : [2022/11/14 20:34]
 */
@Getter
@Setter
@Document(collection = "sub_order_info")
public class SimpleSubOrderInfo extends EntityBase implements Comparable<SimpleSubOrderInfo> {
    /**
     * 合单排序好
     */
    private Integer singlePriority = 0;

    /**
     * 1、证书
     * 2、礼品
     * 3、证书+礼品
     */
    private Integer caItemType;

    /**
     * 是否赠品 true是
     */
    private Boolean caGift = Boolean.FALSE;

    /**
     * 主订单号
     */
    @Indexed
    protected String orderNo;
    /**
     * 子订单号
     */
    @Indexed
    protected String oOrderNo;

    /**
     * 物流公司
     */
    private String logisticsCompany;
    /**
     * 物流编号
     */
    private String logisticsNo;

    /**
     * 售后状态,0:无售后,1:补发中,2:换货中
     */
    private String postSaleStatus = "0";
    /**
     * 售后物流公司
     */
    private String postSaleLogisticsCompany;
    /**
     * 售后物流编号
     */
    private String postSaleLogisticsNo;

    @Override
    public int compareTo(SimpleSubOrderInfo o) {
        return this.singlePriority.compareTo(o.getSinglePriority());
    }
}
